package test;

import javax.servlet.http.HttpServletRequest;

import org.jsonstruts.annotation.WebUrl;
import org.jsonstruts.utils.ActionSupport;
import org.jsonstruts.utils.HttpUtils;

@WebUrl("/index")
public class Index extends ActionSupport {

	private String name;

	private int age;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public Object execute() {
		/*
		 * System.out.println(request==HttpUtils.getInstance().getRequest());
		 * System
		 * .out.println(getResponse()==HttpUtils.getInstance().getResponse());
		 * System
		 * .out.println(getSession()==HttpUtils.getInstance().getSession());
		 */
		User user = new User();
		user.setName(name);
		user.setAge(age);
		return user;
	}

}
